#ifdef _WIN32
#ifndef STRAY_GRAPHICS_VERTEX_LAYOUT_DX9_H
#define STRAY_GRAPHICS_VERTEX_LAYOUT_DX9_H

#include <d3d9.h>

#include "../../SmartPtr/IntrusivePtr.h"
#include "../VertexLayout.h"
#include "LostResource\LostResource.h"

namespace Stray {
namespace Core {
namespace Graphics {
namespace DirectX9 {

class VertexLayoutDX9 : public Stray::Core::Graphics::VertexLayout
{
	friend class DeviceDX9;
	friend class ContextDX9;
private:
	VertexLayoutDX9(IDirect3DVertexDeclaration9 *pVertexDecl, const Stray::Core::Graphics::VertexLayoutTables& tables);
public:
	~VertexLayoutDX9();

	VertexLayoutTables getLayoutTables();

	void* getNativeHandle() const;
private:
	IDirect3DVertexDeclaration9 *pVertexDecl_;
	VertexLayoutTables tables_;
};

typedef Stray::IntrusivePtr<VertexLayoutDX9>::type VertexLayoutDX9Ptr;

}
}
}
}

#endif
#endif